package 装饰模式;

import 装饰模式.impl.Dance;
import 装饰模式.impl.Sing;
import 装饰模式.impl.Strdent;
import 装饰模式.impl.Worker;

public class Test {
    static void test(Person person) {
        person.work();
    }

    public static void main(String[] args) {
        Person person = new Dance(new Sing(new Strdent()));
        test(person);
        Person person1 = new Sing(new Worker());
        test(person1);
    }
}
